<template>
	<view id="app">
		<view class="imgbox">
			<view class="img">
				<text>可用积分</text>
				<text>（10积分=1元）</text>
				<text>285</text>
			</view>
		</view>
		<view class="titlebox">
			<view class="buleline"></view>
			<view class="titletext">
				<text>积分记录</text>
			</view>
		</view>
		<view class="infobox">
			<Integral v-for="v in jifenList" :key="v.phone" :payTime="v.payTime" :title="v.title" :integration="v.integration"></Integral>
		</view>
		<view class="linebox">
			<view class="">
				<!-- <text>我是有底线的</text> -->
				<BottomText></BottomText>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {ref,onMounted} from 'vue'
	import Integral from '@/components/Integral-info/Integral-info.vue'
	import BottomText from '@/components/BottomText/BottomText.vue'
	import http from "../../utils/http";
	//声明容器
	let jifenList = ref([])
	
	
	
	//获取积分的请求
	const getData=function(){
		http({
			url:'/myIntegration/myIntegration',
			params:{
				phone:15308515000
			}
		}).then((data)=>{
			console.log(data.data);
			if(data.code==0){
				jifenList.value=data.data
			}
		})
	}
	
	//挂载后
	onMounted(()=>{
		getData()
	})
</script>

<style lang="less">
	#app{
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	//背景板块样式
	.imgbox{
		width: 750rpx;
		height: 400rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.imgbox>.img{
		width: 520rpx;
		height: 300rpx;
		// background-color: blue;
		display: flex;
		flex-direction: column;
		align-items: center;
		border-radius: 16rpx;
		background: linear-gradient(to left, rgb(102,52,255) , rgb(102,151,255) );
	}
	.img>text:nth-child(1){
		margin-top: 30rpx;
		margin-bottom: 10rpx;
		color: white;
		font-size: 30rpx;
		font-weight: 600;
	}
	.img>text:nth-child(2){
		font-size: 28rpx;
		color: white;
		margin-bottom: 20rpx;
	}
	.img>text:nth-child(3){
		font-size: 90rpx;
		font-weight: 800;
		color: white;
	}
	//积分记录样式
	.titlebox{
		width: 700rpx;
		height: 80rpx;
		display: flex;
		align-items: center;
	}
	
	.titlebox>.buleline{
		width: 10rpx;
		height: 40rpx;
		background-color: rgb(102, 101, 255);
		margin-right: 16rpx;
	}
	.titlebox>.titletext>text{
		font-size: 36rpx;
		font-weight: 600;
	}
	//积分组件样式
	
</style>
